package ligne2vie.topos.client.forms;

import com.google.gwt.maps.client.event.HasMouseEvent;
import com.google.gwt.maps.client.event.MouseEventCallback;

/**
 * The class {@link SummitEditFormDraggableSummitEventCallBack} allows having a complete drag event call back
 * available to warn the summit edition form about the summit place change.
 * 
 * @author thuguerre
 * @since 1.0.0
 */
public class SummitEditFormDraggableSummitEventCallBack extends MouseEventCallback {

	private SummitEditForm form;

	public SummitEditFormDraggableSummitEventCallBack(SummitEditForm form) {
		this.form = form;
	}

	@Override
	public void callback(HasMouseEvent event) {
		this.form.setPosition(event.getLatLng());
	}

}
